package com.ysg.utils;

import android.content.Context;
import android.content.Intent;

public class YBaseActivityUtil {
    private static YBaseActivityUtil instance;

    private YBaseActivityUtil(){
    }

    public static YBaseActivityUtil getInstance(){
        if (instance == null){
            synchronized (YBaseActivityUtil.class){
                if (instance == null){
                    instance = new YBaseActivityUtil();
                }
            }
        }
        return instance;
    }

    /**
     * 钻石充值
     */
    public void jumpMineRecharge(Context context){
        Intent intent = new Intent();
        intent.setAction(YAppUtil.getPackageName() + ".mine.recharge");//清单文件中
        intent.addCategory(Intent.CATEGORY_DEFAULT);
        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        context.startActivity(intent);
    }

    /**
     * vip充值
     */
    public void jumpMineVip(Context context){
        Intent intent = new Intent();
        intent.setAction(YAppUtil.getPackageName() + ".mine.vip");//清单文件中
        intent.addCategory(Intent.CATEGORY_DEFAULT);
        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        context.startActivity(intent);
    }

    /**
     * 任务中心
     */
    public void jumpMineTask(Context context){
        Intent intent = new Intent();
        intent.setAction(YAppUtil.getPackageName() + ".mine.task");//清单文件中
        intent.addCategory(Intent.CATEGORY_DEFAULT);
        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        context.startActivity(intent);
    }

    /**
     * 主页
     */
    public void jumpMain(Context context){
        Intent intent = new Intent();
        intent.setAction(YAppUtil.getPackageName() + ".main");//清单文件中
        intent.addCategory(Intent.CATEGORY_DEFAULT);
        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        context.startActivity(intent);
    }




}
